@import "../variables";
@import "../mixins/clearfix";

.registration {

  .palette__title {
    position: relative;
    margin-bottom: 28px;
  }

  &__base {
    margin-bottom: 50px;
    padding-left: 204px;
    padding-right: 204px;
    color: #6F6F6F;

    .base__form--horizontal {
      
      .form-group {
        margin: 0 0 26px -40px;
        overflow: hidden;

        &:last-child {
          margin-bottom: 0;
        }
      }

      .control-label {
        float: left;
        width: 132px;
        margin-right: 18px;
        padding-top: 10px;
        font-weight: 400;
      }
    }

    .base__form--noncooperative {
      margin-top: 40px;
    }
  }

  &__box {
    position: relative;
    margin-bottom: 40px;
    padding: 28px 85px 40px 22px;
    border-top: 4px solid transparent;
    background-color: #fff;
    box-shadow: 0 0 5px rgba(74, 144, 226, .21);

    &:before {
      position: absolute;
      content: '';
      width: 44px;
      height: 4px;
      background-color: #F7BA5B;
      top: -4px;
      left: 0;
    }

    .form-group {
      margin-bottom: 19px;
    }

    [type="submit"] {
      margin-top: 24px;
    }
  }

  &__licence {
    padding-left: 88px;

    + .palette__narrow {
      margin-top: 50px;
    }
  }

  .form__juxtapose {
    margin-top: 50px;
    padding-right: 116px;

    .form-group {
      margin-bottom: 24px;
    }
    
    .form__label {
      font-size: 16px;
    }

    .checkbox {
      color: #6F6F6F;
    }
  }

  .representative {
    padding-left: 130px;
    color: #52555D;
    font-size: 16px;
  }

  &__complete {
    margin-top: 30px;

    .btn[type="submit"] {
      width: 260px;
      padding-top: 15px;
      padding-bottom: 13px;
      font-size: 18px;
      border-radius: 4px;
    }
  }

  &__login {
    position: absolute;
    right: 0;
    top: 100%;
    padding-top: 19px;
    font-size: 14px;
    color: #52555D;

    > a {
      margin-left: 12px;
      text-decoration: underline;
    }
  }

}

.licence {
  &__inner {
    padding-left: 16px;
  }

  &__item {
    position: relative;
    margin-bottom: 27px;
    @include clearfix();

    &:first-child {
      margin-bottom: 19px;
    }

    &--bottom {
      margin-bottom: 0;

      .licence__uploader,
      .licence__opt {
        float: none;
        display: inline-block;
        vertical-align: bottom;
      }
    }
  }

  &__uploader {
    float: left;
    width: 292px;
    margin-right: 60px;

    .uploader__inner {
      position: relative;
      height: 204px;
      background-color: #E2EEFF;
      background-size: 100%;
      background-position: center;
      background-repeat: no-repeat;
      background-size: auto;
    }

    .uploader__dimmer {
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
      padding: 82px 96px;
      background-color: rgba(0, 0, 0, .3);

      > .btn {
        position: relative;
        width: 100px;
        padding: 10px 18px 9px;
        background-color: #fff;
        border-radius: 6px;
        font-size: 16px;
        line-height: 21px;
        color: $primary;
        cursor: pointer;
        overflow: hidden;

        > input[type="file"] {
          position: absolute;
          width: 0;
          height: 0;
          left: -999px;
          top: -999px;
          visibility: hidden;
        }
      }
    }

    &.uploaded {
      .uploader__dimmer {
        display: none;
      }

      &:hover {
        .uploader__dimmer {
          display: block;
        }
      }
    }

    &.holdingcard .uploader__inner {
      background-image: url('~images/id-card-in-hand.png');
    }

    &.biz .uploader__inner {
      background-image: url('~images/licence-default.png');
    }

    &.frontid .uploader__inner {
      background-image: url('~images/id-front-default.png');
    }

    &.backid .uploader__inner {
      background-image: url('~images/id-back-default.png');
    }
  }

  &__name {
    margin-top: 0;
    margin-bottom: 9px;
    font-size: 18px;
    font-weight: 400;
    color: #2F3032;
    overflow: hidden;
  }

  &__examplar {
    float: right;
    padding-top: 4px;
    font-size: 14px;
    color: $primary;
    text-decoration: underline;
  }

  &__previewer {
    position: absolute;
    margin-top: 15px;
    left: 347px;
    top: 50%;
    transform: translateY(-50%);

    .previewer {
      &__card {
        position: relative;
        padding: 18px 22px 19px;
        width: 426px;
        border: 1px solid #95B3E4;
        background-color: #F4F8FE;

        &:before, &:after {
          position: absolute;
          content: '';
          top: 50%;
          left: -14px;
          margin-top: -7px;
          border-top: 7px solid transparent;
          border-bottom: 7px solid transparent;
          border-right: 14px solid #F4F8FE;
        }

        &:before {
          z-index: 2;
        }

        &:after {
          margin-top: -8px;
          left: -15px;
          border-top-width: 8px;
          border-bottom-width: 8px;
          border-right: 15px solid #95B3E4;
          z-index: 1;
        }
      }

      &__line {
        margin-bottom: 0;
        padding-bottom: 5px;
        font-size: 14px;
        overflow: hidden;
        border-bottom: 2px dotted #DFDFDF;

        + .previewer__line {
          margin-top: 13px;
        }

        .line__title {
          float: left;
          min-width: 113px;
          color: #9B9B9B;
          line-height: 1;
          font-weight: 400;
        }

        .line__content {
          color: $primary;
          font-weight: 600;
          line-height: 1;
          overflow: hidden;
        }
      }
    }
  }

  &__opt > .btn {
    width: 260px;
    padding-bottom: 11px;
    font-size: 18px;
    line-height: 24px;
    border-radius: 4px;
  }
}

.modal-exemplar {
  .modal-dialog {
    width: 640px;
  }

  .modal-content {
    border: 0;
    border-radius: 4px;
    box-shadow: none;
    overflow: hidden;
  }

  .modal-header {
    padding: 8px 10px 11px 20px;
    background-color: $primary;
    color: #fff;
    border-bottom: 0;

    .modal-title {
      font-size: 16px;
      font-weight: 400;
      line-height: 21px;
    }
  }

  .exemplar__image {
    position: relative;
    padding-bottom: 25px;
    overflow: hidden;
    > img {
      display: block;
      margin: auto;
      max-width: 100%;
      height: auto;
    }
  }
}